package com.haredot.mapper;

import com.haredot.entity.Course;
import com.haredot.entity.Student;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface StudentMapper {

    int insert(Student record);

    Student selectByPrimaryKey(Long id);

    int updateByPrimaryKey(Student record);

    List<Student> findAll(@Param("sno") Long sno);

    int remove(Long sno);

    void batchRemove(List<Long> ids);

    List<Course> findCourseListBySno(Long sno);

    int removeCourseBySno(Long sno);

    int saveCourseAndSno(@Param("sno") Long sno, @Param("courses") List<Integer> courseIds);

    List<Map<String, Object>> findCoursesBySno(Long sno);

    int updatePassword(Student student);
}